<template>
	<view class="mainpadding" v-if="pageShow">
		<!-- 用户协议1 -->
		<template v-if="type==1"><u-parse :content="systeminfo.user_xy"></u-parse></template>
		<!-- 隐私政策2 -->
		<template v-if="type==2"><u-parse :content="systeminfo.user_yszc"></u-parse></template>
		<!-- 关于我们4 -->
		<template v-if="type==4"><u-parse :content="systeminfo.about_us"></u-parse></template>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				systeminfo: {},
				type: "",
				pageShow: false
			}
		},
		onLoad(options) {
			let type = options.type
			this.type = type
			if (type == 1) this.settitle("用户协议")
			if (type == 2) this.settitle("隐私政策")
			if (type == 4) this.settitle("关于我们")
			this.system()
		},
		methods: {
			settitle(val) {
				uni.setNavigationBarTitle({
					title: val
				})
			},
			system() {
				httpRequest.request('/api/index/getConfigInfo', 'GET', {}).then(res => {
					this.systeminfo = res.data
					this.pageShow = true
				})
			}
		}
	}
</script>

<style>

</style>